{template 'header', 'member'}
<script type="text/javascript">c(1);</script>
<div class="menu">
<table cellpadding="0" cellspacing="0">
<tr>
<td class="tab" id="add"><a href="?mid={$mid}&resume=1&action=add"><span>创建简历</span></a></td>
{if $_userid}
<td class="tab" id="s3"><a href="?mid={$mid}&resume=1"><span>已发布<span class="px10">({$nums[3]})</span></span></a></td>
<td class="tab" id="s2"><a href="?mid={$mid}&resume=1&status=2"><span>审核中<span class="px10">({$nums[2]})</span></span></a></td>
<td class="tab" id="s1"><a href="?mid={$mid}&resume=1&status=1"><span>未通过<span class="px10">({$nums[1]})</span></span></a></td>
<td class="tab" id="apply"><a href="?mid={$mid}&resume=1&action=apply"><span>应聘职位<span class="px10">({$nums[apply]})</span></span></a></td>
{/if}
</tr>
</table>
</div>
{if $action=='add' || $action=='edit'}
<iframe src="" name="send" id="send" style="display:none;"></iframe>
<form method="post" action="?" id="dform" target="send" onsubmit="return check();">
<input type="hidden" name="action" value="{$action}"/>
<input type="hidden" name="mid" value="{$mid}"/>
<input type="hidden" name="resume" value="1"/>
<input type="hidden" name="itemid" value="{$itemid}"/>
<input type="hidden" name="forward" value="{$forward}"/>
<table cellpadding="6" cellspacing="1" class="tb">
{if $status==1 && $action=='edit' && $note}
<tr>
<td class="tl">未通过原因</td>
<td class="tr f_blue">{$note}</td>
</tr>
{/if}
<tr>
<td class="tl"><span class="f_red">*</span> 简历名称</td>
<td class="tr f_gray"><input name="post[title]" type="text" id="title" size="50" value="{$title}"/> <span id="dtitle" class="f_red"></span></td>
</tr>
<tr>
<td class="tl"><span class="f_red">*</span> 行业/职位</td>
<td class="tr"><div id="catesch"></div>{ajax_category_select('post[catid]', '选择分类', $catid, $moduleid, $DT_TOUCH ? '' : 'size="2" style="height:120px;width:180px;"')} {if !$DT_TOUCH}<br/>{/if}{if $DT[schcate_limit]}<input type="button" value="搜索分类" onclick="schcate({$moduleid});" class="btn"/> {/if}<span id="dcatid" class="f_red"></span></td>
</tr>
<tr>
<td class="tl"><span class="f_red">*</span> 真实姓名</td>
<td class="tr"><input name="post[truename]" type="text" id="truename" size="20" value="{$truename}" /> <br/><span id="dtruename" class="f_red"></span></td>
</tr>

<tr>
<td class="tl">免冠照片</td>
<td class="tr"><input name="post[thumb]" type="text" size="60" id="thumb" value="{$thumb}" readonly/>&nbsp;&nbsp;<a href="javascript:void(0);" onclick="Dthumb({$moduleid},{$MOD[thumb_width]},{$MOD[thumb_height]}, Dd('thumb').value, true);" class="t">[上传]</a>&nbsp;&nbsp;<a href="javascript:_preview(Dd('thumb').value);" class="t">[预览]</a>&nbsp;&nbsp;<a href="javascript:void(0);" onclick="Dd('thumb').value='';" class="t">[删除]</a></td>
</tr>

<tr>
<td class="tl"><span class="f_red">*</span> 性别</td>
<td class="tr">
{loop $GENDER $k $v}
{if $k > 0}
<input type="radio" name="post[gender]" id="gender_{$k}" value="{$k}"{if $k == $gender} checked{/if}/><label for="gender_{$k}"> {$v}</label> 
{/if}
{/loop}
</td>
</tr>

<tr>
<td class="tl"><span class="f_red">*</span> 婚姻状况</td>
<td class="tr">
{loop $MARRIAGE $k $v}
{if $k > 0}
<input type="radio" name="post[marriage]" id="marriage_{$k}" value="{$k}"{if $k == $marriage} checked{/if}/><label for="marriage_{$k}"> {$v}</label> 
{/if}
{/loop}
</td>
</tr>

<tr>
<td class="tl"><span class="f_red">*</span> 现居住地</td>
<td class="tr">{ajax_area_select('post[areaid]', '请选择', $areaid)} <span id="dareaid" class="f_red"></span></td>
</tr>

<tr>
<td class="tl"><span class="f_red">*</span> 生日</td>
<td class="tr">
<input name="post[byear]" type="text" id="byear" size="4" value="{$byear}"/> 年
<select name="post[bmonth]">
{php for($i = 1; $i < 13; $i++) { }
<option value="{$i}"{if $i == $bmonth} selected{/if}>{$i}</option>
{php } }
</select>
月
<select name="post[bday]">
{php for($i = 1; $i < 32; $i++) { }
<option value="{$i}"{if $i == $bday} selected{/if}>{$i}</option>
{php } }
</select>
日

<span id="dbyear" class="f_red"></span>
</td>
</tr>

<tr>
<td class="tl">身高</td>
<td class="tr"><input name="post[height]" type="text" id="height" size="10" value="{$height}" /> cm <span id="dheight" class="f_red"></span></td>
</tr>

<tr>
<td class="tl">体重</td>
<td class="tr"><input name="post[weight]" type="text" id="weight" size="10" value="{$weight}" /> kg <span id="dweight" class="f_red"></span></td>
</tr>

<tr>
<td class="tl"><span class="f_red">*</span> 学历</td>
<td class="tr">
{loop $EDUCATION $k $v}
{if $k > 0}
<input type="radio" name="post[education]" id="education_{$k}" value="{$k}"{if $k == $education} checked{/if}/><label for="education_{$k}"> {$v}</label> 
{/if}
{/loop}
</td>
</tr>

<tr>
<td class="tl"><span class="f_red">*</span> 毕业院校</td>
<td class="tr"><input name="post[school]" type="text" id="school" size="30" value="{$school}"/> <span id="dschool" class="f_red"></span></td>
</tr>

<tr>
<td class="tl">所学专业</td>
<td class="tr"><input name="post[major]" type="text" id="major" size="30" value="{$major}"/></td>
</tr>

<tr>
<td class="tl">专业技能</td>
<td class="tr"><input name="post[skill]" type="text" size="50" value="{$skill}"/></td>
</tr>

<tr>
<td class="tl">语言水平</td>
<td class="tr"><input name="post[language]" type="text"  size="50" value="{$language}"/></td>
</tr>


<tr>
<td class="tl"><span class="f_red">*</span> 工作性质</td>
<td class="tr">
{loop $TYPE $k $v}
{if $k > 0}
<input type="radio" name="post[type]" id="type_{$k}" value="{$k}"{if $k == $type} checked{/if}/><label for="type_{$k}"> {$v}</label> 
{/if}
{/loop}
</td>
</tr>

<tr>
<td class="tl">期望薪资</td>
<td class="tr"><input name="post[minsalary]" type="text" id="minsalary" size="6" value="{$minsalary}"/> 至 <input name="post[maxsalary]" type="text" id="maxsalary" size="6" value="{$maxsalary}"/> {$DT[money_unit]}/月 (不填或者填0为不限)</td>
</tr>

<tr>
<td class="tl"><span class="f_red">*</span> 工作经验</td>
<td class="tr">
<input type="text" name="post[experience]" value="{$experience}" size="4" id="experience"/> &nbsp;&nbsp;年 <span id="dexperience" class="f_red"></span></td>
</tr>

{if $FD}{fields_html('<td class="tl">', '<td class="tr">', $item)}{/if}

<tr>
<td class="tl"><span class="f_red">*</span> 自我鉴定</td>
<td class="tr f_gray"><textarea name="post[content]" id="content" class="dsn">{$content}</textarea>
{deditor($moduleid, 'content', $group_editor, '100%', 350)}<br/><span id="dcontent" class="f_red"></span>
</td>
</tr>

<tr>
<td class="tl"><span class="f_red">*</span> 联系手机</td>
<td class="tr"><input name="post[mobile]" id="mobile" type="text" size="30" value="{$mobile}"/> <span id="dmobile" class="f_red"></span></td>
</tr>
<tr>
<td class="tl"><span class="f_red">*</span> 电子邮件</td>
<td class="tr"><input name="post[email]" id="email" type="text" size="30" value="{$email}" /> <span id="demail" class="f_red"></span></td>
</tr>
<tr>
<td class="tl">联系电话</td>
<td class="tr"><input name="post[telephone]" id="telephone" type="text" size="30" value="{$telephone}"/> <span id="dtelephone" class="f_red"></span></td>
</tr>
<tr>
<td class="tl">联系地址</td>
<td class="tr"><input name="post[address]" id="address" type="text" size="60" value="{$address}"/></td>
</tr>
{if $DT[im_qq]}
<tr>
<td class="tl">QQ</td>
<td class="tr"><input name="post[qq]" id="qq" type="text" size="30" value="{$qq}"/></td>
</tr>
{/if}
{if $DT[im_ali]}
<tr>
<td class="tl">阿里旺旺</td>
<td class="tr"><input name="post[ali]" id="ali" type="text" size="30" value="{$ali}"/></td>
</tr>
{/if}
{if $DT[im_msn]}
<tr>
<td class="tl">MSN</td>
<td class="tr"><input name="post[msn]" id="msn" type="text" size="40" value="{$msn}"/></td>
</tr>
{/if}
{if $DT[im_skype]}
<tr>
<td class="tl">Skype</td>
<td class="tr"><input name="post[skype]" id="skype" type="text" size="30" value="{$skype}"/></td>
</tr>
{/if}

<tr>
<td class="tl">求职状态</td>
<td class="tr">
<select name="post[situation]">
{loop $SITUATION $k $v}
<option value="{$k}"{if $k==$situation} selected{/if}>{$v}</option> 
{/loop}
</select>
</td>
</tr>

<tr>
<td class="tl">公开程度</td>
<td class="tr">
<input type="radio" name="post[open]" value="3"{if $open==3} checked{/if}/> 开放
<input type="radio" name="post[open]" value="2"{if $open==2} checked{/if}/> 仅网站可见
<input type="radio" name="post[open]" value="1"{if $open==1} checked{/if}/> 关闭
</td>
</tr>

<tr>
<td class="tl">简历模板</td>
<td class="tr">{tpl_select('resume', $module, 'post[template]', '默认模板', $template, 'id="template"')}</td>
</tr>
{if $fee_add}
<tr>
<td class="tl">发布此信息需消费</td>
<td class="tr"><span class="f_b f_red">{$fee_add}</span> {$fee_unit}</td>
</tr>
{if $fee_currency == 'money'}
<tr>
<td class="tl">{$DT[money_name]}余额</td>
<td class="tr"><span class="f_blue f_b">{$_money}{$fee_unit}</span> <a href="charge.php?action=pay" target="_blank" class="t">[充值]</a></td>
</tr>
{else}
<tr>
<td class="tl">{$DT[credit_name]}余额</td>
<td class="tr"><span class="f_blue f_b">{$_credit}{$fee_unit}</span> <a href="credit.php?action=buy" target="_blank" class="t">[购买]</a></td>
</tr>
{/if}
{/if}
{if $need_password}
<tr>
<td class="tl"><span class="f_red">*</span> 支付密码</td>
<td class="tr">{template 'password', 'chip'} <span id="dpassword" class="f_red"></span></td>
</tr>
{/if}
{if $need_question}
<tr>
<td class="tl"><span class="f_red">*</span> 验证问题</td>
<td class="tr">{template 'question', 'chip'} <span id="danswer" class="f_red"></span></td>
</tr>
{/if}
{if $need_captcha}
<tr>
<td class="tl"><span class="f_red">*</span> 验证码</td>
<td class="tr">{template 'captcha', 'chip'} <span id="dcaptcha" class="f_red"></span></td>
</tr>
{/if}
<tr>
<td class="tl">&nbsp;</td>
<td class="tr" height="50"><input type="submit" name="submit" value=" 提 交 " class="btn_g"/>&nbsp;&nbsp;&nbsp;&nbsp;<input type="button" value=" 返 回 " class="btn" onclick="history.back(-1);"/></td>
</tr>
</table>
</form>
{load('clear.js')}
{load('guest.js')}
{if $action=='add'}
<script type="text/javascript">s('mid_resume');m('{$action}');</script>
{else}
<script type="text/javascript">s('mid_resume');m('s{$status}');</script>
{/if}
{elseif $action=='apply'}
<div class="tt">
<form action="?">
<input type="hidden" name="mid" value="{$mid}"/>
<input type="hidden" name="resume" value="1"/>
<input type="hidden" name="action" value="{$action}"/>
&nbsp;{category_select('catid', '行业/职位', $catid, $moduleid)}&nbsp;
<input type="text" size="50" name="kw" value="{$kw}" title="关键词"/>&nbsp;
<input type="submit" value=" 搜 索 " class="btn"/>
<input type="button" value=" 重 置 " class="btn" onclick="Go('?mid={$mid}&resume=1&action={$action}');"/>
</form>
</div>
<div class="ls">
<table cellpadding="0" cellspacing="0" class="tb">
<tr>
<th>招聘信息</th>
<th>我的简历</th>
<th>应聘时间</th>
<th>状态</th>
<th width="60">管理</th>
</tr>
{loop $lists $k $v}
<tr onmouseover="this.className='on';" onmouseout="this.className='';" align="center">
<td align="left">&nbsp;&nbsp;&nbsp;<a href="{$MODULE[$mid][linkurl]}{$v[linkurl]}" target="_blank" class="t">{$v[title]}</a></td>
<td align="left">&nbsp;&nbsp;<a href="{$MODULE[$mid][linkurl]}{rewrite('resume.php?itemid='.$v['resumeid'])}" target="_blank" class="t">{$v[resumetitle]}</a></td>
<td class="f_gray px11">{timetodate($v[applytime], 5)}</td>
<td>&nbsp;&nbsp;
{if $v[status] == 3}
<span class="f_blue">邀请面试</span>
{elseif $v[status] == 2}
已查看
{elseif $v[status] == 1}
<span class="f_gray">未查看</span>
{elseif $v[status] == 0}
<span class="f_red">已拒绝</span>
{/if}
&nbsp;&nbsp;
</td>
<td>
<a href="?mid={$mid}&resume=1&action=apply_delete&itemid={$v[applyid]}" onclick="return confirm('确定要删除吗？此操作将不可撤销');"><img width="16" height="16" src="{DT_STATIC}{$MODULE[2][moduledir]}/image/delete.png" title="删除" alt=""/></a>
</td>
</tr>
{/loop}
</table>
</div>
<div class="pages">{$pages}</div>
<script type="text/javascript">s('mid_resume');m('apply');</script>
{else}
<div class="tt">
<form action="?">
<input type="hidden" name="mid" value="{$mid}"/>
<input type="hidden" name="resume" value="1"/>
<input type="hidden" name="status" value="{$status}"/>
&nbsp;{category_select('catid', '行业/职位', $catid, $moduleid)}&nbsp;
<input type="text" size="50" name="kw" value="{$kw}" title="关键词"/>&nbsp;
<input type="submit" value=" 搜 索 " class="btn"/>
<input type="button" value=" 重 置 " class="btn" onclick="Go('?mid={$mid}&resume=1&status={$status}');"/>
</form>
</div>
<div class="ls">
<table cellpadding="0" cellspacing="0" class="tb">
<tr>
<th>标 题</th>
<th>行 业</th>
<th>职 位</th>
<th>更新时间</th>
<th>状态</th>
<th>浏览</th>
<th width="100">管理</th>
</tr>
{loop $lists $k $v}
<tr onmouseover="this.className='on';" onmouseout="this.className='';" align="center">
<td align="left">&nbsp;&nbsp;&nbsp;{if $v[status]==3}<a href="{$v[linkurl]}" target="_blank" class="t">{else}<a href="?mid={$mid}&resume=1&action=edit&itemid={$v[itemid]}" class="t">{/if}{$v[title]}</a>{if $v[status]==1 && $v[note]} <a href="javascript:" onclick="alert('{$v[note]}');"><img src="{DT_STATIC}{$MODULE[2][moduledir]}/image/why.gif" title="未通过原因"/></a>{/if}</td>
<td>&nbsp;{$CATEGORY[$v[parentid]][catname]}&nbsp;</td>
<td>{$CATEGORY[$v[catid]][catname]}</td>
<td class="f_gray px11" title="添加时间 {timetodate($v[addtime], 5)}">{timetodate($v[edittime], 5)}</td>
<td>
{if $v[open] == 3}
开放
{elseif $v[open] == 2}
<span class="f_blue">网站可见</span>
{elseif $v[open] == 1}
<span class="f_red">关闭</span>
{else}
&nbsp;
{/if}
</td>
<td class="f_gray px11">{$v[hits]}</td>
<td>
<a href="?mid={$mid}&resume=1&action=edit&itemid={$v[itemid]}"><img width="16" height="16" src="{DT_STATIC}{$MODULE[2][moduledir]}/image/edit.png" title="修改" alt=""/></a>&nbsp;
<a href="?mid={$mid}&resume=1&action=add&itemid={$v[itemid]}&catid={$v[catid]}"><img width="16" height="16" src="{DT_STATIC}{$MODULE[2][moduledir]}/image/new.png" title="复制简历" alt=""/></a>&nbsp;
<a href="?mid={$mid}&resume=1&action=refresh&itemid={$v[itemid]}"><img width="16" height="16" src="{DT_STATIC}{$MODULE[2][moduledir]}/image/refresh.png" title="一键更新" alt=""/></a>&nbsp;
<a href="?mid={$mid}&resume=1&action=delete&itemid={$v[itemid]}" onclick="return confirm('确定要删除吗？此操作将不可撤销');"><img width="16" height="16" src="{DT_STATIC}{$MODULE[2][moduledir]}/image/delete.png" title="删除" alt=""/></a>
</td>
</tr>
{/loop}
</table>
</div>
{if $MG[resume_limit] || (!$MG['fee_mode'] && $MOD[fee_add])}
<div class="limit">
{if $MG[resume_limit]}
总共可发 <span class="f_b f_red">{$MG[resume_limit]}</span> 条&nbsp;&nbsp;&nbsp;
当前已发 <span class="f_b">{$limit_used}</span> 条&nbsp;&nbsp;&nbsp;
还可以发 <span class="f_b f_blue">{$limit_free}</span> 条&nbsp;&nbsp;&nbsp;
{/if}
{if !$MG['fee_mode'] && $MOD[fee_add]}
发布信息收费 <span class="f_b f_red">{$MOD[fee_add]}</span> {if $MOD[fee_currency] == 'money'}{$DT[money_unit]}{else}{$DT[credit_unit]}{/if}/条&nbsp;&nbsp;&nbsp;
可免费发布 <span class="f_b">{if $MG[resume_free_limit]<0}无限{else}{$MG[resume_free_limit]}{/if}</span> 条&nbsp;&nbsp;&nbsp;
{/if}
</div>
{/if}
<div class="pages">{$pages}</div>
<script type="text/javascript">s('mid_resume');m('s{$status}');</script>
{/if}
{if $action == 'add' || $action == 'edit'}
<script type="text/javascript">
function check() {
	var l;
	var f;
	f = 'title';
	l = Dd(f).value.length;
	if(l < 2) {
		Dmsg('请填写简历名称', f);
		return false;
	}
	f = 'catid_1';
	if(Dd(f).value == 0) {
		Dmsg('请选择求职行业', 'catid', 1);
		return false;
	}
	f = 'truename';
	l = Dd(f).value.length;
	if(l < 2) {
		Dmsg('请填写真实姓名', f);
		return false;
	}
	f = 'areaid_1';
	if(Dd(f).value == 0) {
		Dmsg('请选择居住地区', 'areaid', 1);
		return false;
	}
	f = 'byear';
	if(Dd(f).value.length != 4) {
		Dmsg('请填写生日', f);
		return false;
	}
	f = 'school';
	if(Dd(f).value.length < 2) {
		Dmsg('请填写毕业院校', f);
		return false;
	}
	f = 'experience';
	if(Dd(f).value.length < 1) {
		Dmsg('请填写工作经验', f);
		return false;
	}
	f = 'mobile';
	if(Dd(f).value.length < 7) {
		Dmsg('请填写联系手机', f);
		return false;
	}
	f = 'email';
	if(Dd(f).value.length < 6) {
		Dmsg('请填写电子邮件', f);
		return false;
	}
	f = 'content';
	l = FCKLen();
	if(l < 5) {
		Dmsg('自我鉴定最少5字，当前已输入'+l+'字', f);
		return false;
	}
	{if $FD}{fields_js()}{/if}
	{if $CP}{property_js()}{/if}
{if $need_password}
	f = 'password';
	l = Dd(f).value.length;
	if(l < 6) {
		Dmsg('请填写支付密码', f);
		return false;
	}
{/if}
{if $need_question}
	f = 'answer';
	l = Dd(f).value.length;
	if(l < 1) {
		Dmsg('请填写验证问题', f);
		return false;
	}
	if(Dd('c'+f).innerHTML.indexOf('error') != -1) {
		Dd(f).focus();
		return false;
	}
{/if}
{if $need_captcha}
	f = 'captcha';
	l = Dd(f).value;
	if(!is_captcha(l)) {
		Dmsg('请填写正确的验证码', f);
		return false;
	}
	if(Dd('c'+f).innerHTML.indexOf('error') != -1) {
		Dd(f).focus();
		return false;
	}
{/if}
	return true;
}
</script>
{/if}
{template 'footer', 'member'}